domctl: fix IRQ permission granting/revocation
authorJan Beulich <JBeulich@suse.com>
Fri, 12 Dec 2014 10:24:13 +0000 (10:24 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 5 Jan 2015 15:20:24 +0000 (10:20 -0500)
commit6fb3a07bc0ad656b5f76eb9fc961bcd1d3cace58
tree4046d52348470b217710f670dbe7abc087d5f9ec
parent21c9fce8efbf407dc5d6bcc78bf65a1402623db9
domctl: fix IRQ permission granting/revocation

Commit 545607eb3c ("x86: fix various issues with handling guest IRQs")
wasn't really consistent in one respect: The granting of access to an
IRQ shouldn't assume the pIRQ->IRQ translation to be the same in both
domains. In fact it is wrong to assume that a translation is already/
still in place at the time access is being granted/revoked.

What is wanted is to translate the incoming pIRQ to an IRQ for
the invoking domain (as the pIRQ is the only notion the invoking
domain has of the IRQ), and grant the subject domain access to
the resulting IRQ.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/common/domctl.c
xen/include/xen/iocap.h